package com.zealfi.wk.netty.server.handler.outbound;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;

/**
 * Created by kuan at 2018-06-06 下午 5:33
 */
public class MyServerOutHandler extends ChannelOutboundHandlerAdapter {

    @Override
    public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {
        System.out.println(msg);
        //记得释放 promise
        promise.setSuccess();
    }
}
